import React from 'react'
import { View, Image, Checkbox, Button } from '@tarojs/components'
import Taro from '@tarojs/taro'
import './ticket.scss'
import noticeImg from '../../images/notice.png'
import changeImg from '../../images/change.png'
import NavBar from '../../components/navbar/navbar'


const TicketsIndex = () => {

  const showAddress = () => {
    Taro.navigateTo({
      url: '/pages/selectCity/selectCity'
    })
  }
  
  return <View className="container-tickets">
    <NavBar isFixed={true} isShowBorder={false}/>
    <View className="selected-box">
      <View className="note-item">
        <Image src={noticeImg} className="notice-img"/>
        <View className="note-text">青岛地区疫情乘车防控须知</View>
      </View>
      <View className="where-towhere">
        <View className="item-address left-address" onClick={(e) => showAddress(e, 'left')}>上海</View>
        <Image src={changeImg} className="icon-img" />
        <View className="item-address right-address">请选择</View>
      </View>
      <View className="selected-date">
        <View className="date-one">10月25日</View>
        <View className="date-two">周日 明天 重阳节</View>
      </View>
      <View className="selected-types">
        <View className="stu-tic">
          <Checkbox value="cb" checked="true"/>学生票
        </View>
        <View className="stu-gt">
          <Checkbox value="cb" checked="true"/>高铁票
        </View>
      </View>
      <Button className="confirm-btn">火车票查询</Button>
    </View>
  </View>
}

export default TicketsIndex